<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格</title>
    <link rel="stylesheet" href="../../../dest/css/fui.css">
</head>
<body>
<div class="demo" style="margin: 15px;"></div>




<script src="../../../dest/js/fui.js"></script>
<script>
    fui.use('JsTable',function(){
        JsTable('.demo').render({
            height:315,
            fixed:'left',
            checkbox:true,
            cols:[//表头
                {field:'id',title:'ID',width:150},
                {field:'name',title:'用户名',width:200},
                {field:'sex',width:80,fun:function(key){return key==1?'男':'女'}},
                {field:'type',width:120,fieldName:'addType',title:'加项',fun:function(key){return key==1?'yes':''}},
                {field:'type',width:120,fieldName:'minusType',title:'减项',fun:function(key){return key==2?'yes':''}}
            ],
            staticData:{
                records:[{id:1,name:'张三',sex:1,type:1},{id:2,name:'李四',sex:1,type:2},{id:3,name:'王五',sex:2,type:1},{id:4,name:'赵六',sex:1,type:1}]
            }
        });
    });
</script>
</body>
</html>
